﻿namespace RpcClient.Interface
{
    [Attr.IgnoreIoc]
    public interface ITccEvent
    {

    }
    /// <summary>
    /// 事务事件
    /// </summary>
    [Attr.IgnoreIoc]
    public interface IRpcTranEvent<T, Extend> : ITccEvent where T : class
    {
        /// <summary>
        /// 事件提交
        /// </summary>
        /// <param name="data"></param>
        /// <param name="extend"></param>
        void Commit(T data, Extend extend);
        /// <summary>
        /// 回滚事务
        /// </summary>
        /// <param name="data"></param>
        /// <param name="extend"></param>
        void Rollback(T data, Extend extend);
    }
    [Attr.IgnoreIoc]
    public interface IRpcTranNoParamEvent<Extend>: ITccEvent
    {
        /// <summary>
        /// 事件提交
        /// </summary>
        /// <param name="extend"></param>
        void Commit(Extend extend);
        /// <summary>
        /// 回滚事务
        /// </summary>
        /// <param name="extend"></param>
        void Rollback(Extend extend);
    }
    [Attr.IgnoreIoc]
    public interface IRpcTranEvent<T>: ITccEvent where T : class
    {
        /// <summary>
        /// 事件提交
        /// </summary>
        /// <param name="data"></param>
        void Commit(T data, string extend);
        /// <summary>
        /// 回滚事务
        /// </summary>
        /// <param name="data"></param>
        void Rollback(T data, string extend);
    }
    [Attr.IgnoreIoc]
    public interface IRpcTranEvent: ITccEvent
    {
        /// <summary>
        /// 事件提交
        /// </summary>
        void Commit();
        /// <summary>
        /// 回滚事务
        /// </summary>
       void Rollback();
    }
}
